// 通用接口

import { request } from '@/utils/service'
import { baseApiUrl } from '@/api/baseApiUrl'
/** 上传图片 */

interface IuploadFileRequestData {
  file: File
}
export function uploadFile(data: IuploadFileRequestData) {
  const formdata = new FormData()
  formdata.append('file', data.file)
  return request({
    url: baseApiUrl.UPLOAD_FILE,
    method: 'post',
    data: formdata,
    headers: {
      'Content-Type': 'multipart/form-data;'
    }
  })
}
